{include file="header.html"}
<body class="gr">

<div class="navBar">
	<a class="left" href="javascript:history.back()"><i class="return"></i></a>
	<div class="titleView-x">修改密码</div>
</div>

<div class="member-password main-top">
	<form action="api.php?app=member&act=password" method="post">
	<input type="hidden" name="gourl" value="wap.php?tpl=member.set" />
	<ul class="tableView tableView-noMargin tableView-light">
		<li>
			<h1><div><i></i><input type="password" name="origin_password" id="origin_password" /></div></h1>
		</li>
		<li>
			<h1><input type="password" name="new_password" id="new_password" /></h1>
		</li>
		<li>
			<h1><input type="password" name="repass" id="repass" /></h1>
		</li>
	</ul>
	</form>
	<div class="buttonView">
		<a class="btn pass" href="javascript:void(0)">确定</a>
	</div>
</div>

{include file="footer.html"}
<script>
$(function(){
	$('#origin_password').placeholder('请输入旧密码');
	$('#new_password').placeholder('请输入新密码');
	$('#repass').placeholder('确认新密码');
	$('.member-password i').click(function(){
		var input = $('#origin_password');
		if(!!input.data('show')){
			input.removeData('show');
			$('#origin_password, #new_password, #repass').prop('type', 'password');
			$(this).removeClass('x');
		}else{
			input.data('show', true);
			$('#origin_password, #new_password, #repass').prop('type', 'text');
			$(this).addClass('x');
		}
	});
	$('.btn').click(function(){
		if(!$('#origin_password').val().length || !$('#new_password').val().length || !$('#repass').val().length){
			$.overloadError('请填写完整');
			return;
		}
		if($('#new_password').val() != $('#repass').val()){
			$.overloadError('两次新密码不相同');
			return;
		}
		$('form').submit();
	});
});
</script>